const express = require("express");
const userController = require("../../controller/userController");
const auth = require("../../middlewares/auth");
const userValidator = require("../../validator/userValidator");

const router = express();

router.post("/register", userValidator.register, userController.register);

router.post("/login", userValidator.login, userController.login);

router.get("/:name", auth, userController.getUser);

module.exports = router;
